//
//  LBUtils.h
//  OpenGLGame
//
//  Created by Nguyen Cong Huy on 11/12/12.
//  Copyright (c) 2012 UIT. All rights reserved.
//

#ifndef OpenGLGame_LBUtils_h
#define OpenGLGame_LBUtils_h

#include <list>
using namespace std;

#define DELETE_SAFELY(x) if((x)!=0) delete (x); (x) = 0;
#define DELETE_SAFELY_ARRAY(x) if((x)!=0) delete[] (x); (x) = 0;

bool isExistStringInList(list<const char*>* strings, const char* element);
int indexOfStringInList(list<const char*>* strings, const char* element);
void deleteSingleton();
void createHistogram(unsigned char* imageData, int dataLength, int* outHistogram);

#endif
